-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2367 - Ability to move items on the canvas #3286
Conversation
await bondTwoMonomers(page, peptide3, peptide2); | ||
await bondTwoMonomers(page, peptide3, peptide4); | ||
|
||
await page.screenshot({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have function takeEditorScreenshot(page) which takes screenshots of result structure, name it according to test function name and place into folder - you may reuse it here and on 117 line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I decided to use this function here because I saw screenshots
folder and I wanted to put it into the same place.
I replaced the way to do screenshots. Now I use takeEditorScreenshot
@@ -278,6 +279,13 @@ export abstract class BaseMonomerRenderer extends BaseRenderer { | |||
} | |||
} | |||
|
|||
public moveSelection(offset: Vec2) { | |||
assert(this.rootElement); | |||
this.monomer.moveRelative(offset); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move this row to DrawingEntitiesManager. Renderers should not change the model. We created DrawingEntitiesManager for this purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
@@ -30,6 +30,13 @@ export class PolymerBondRenderer extends BaseRenderer { | |||
return this.rootBBox?.height || 0; | |||
} | |||
|
|||
public moveSelection() { | |||
assert(this.rootElement); | |||
this.polymerBond.moveToLinkedMonomers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
this.polymerBonds.forEach((drawingEntity) => { | ||
command.merge( | ||
this.createDrawingEntityMovingCommand(drawingEntity, offset), | ||
); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mode only selected bonds and those which are connected to selected monomers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now it it is better, thank you!
0716c44
to
19b56df
Compare
d8c9da2
to
8059c77
Compare
How the feature works? / How did you fix the issue?
Check list
#1234 – issue name